# BitchX IRC-Client

Basic 1-server BitchX setup, including ankh's scripts & theming.

**Files:**
* [BitchX.desktop](#bitchxdesktop)
* [bitchx.sh](#bitchxsh)
* [.bitchxrc](#bitchxrc)
* [.BitchX/](#bitchx)

**Other:**
* [Usage](#usage)
* [Screenshot](#screenshot)



# BitchX.desktop
This file should be placed in either one of the following locations:
```
~/.local/share/applications/
/usr/share/applications/
```

This file makes sure, that BitchX can be launched from your DE's menu (WM's usually work without them).
You may want to change the icon (by default, uses hexchat's) `Icon=hexchat`.
**For Example:**
`Icon=/home/jayvii/.icons/bitchx.png`

You may also want to replace the terminal emulator (uses your session's default one), as well as the path to the launch-script (if you are using that script to begin with...) `Exec=$TERM -e ~/scripts/bitchx.sh`
**For Example:**
`Exec=urxvt -e ~/.local/share/bitchx.sh`


# bitchx.sh
This file handles your IRC-credentials and launches BitchX.
you should probably change some things in there...

**Nickname:**
`export IRCNICK=$USER` -> `export IRCNICK=jayvii`

**Username:**
`export IRCUSER=$USER` -> `export IRCUSER=JayVii`

**Real Name:**
`export IRCNAME=$USER` -> `export IRCNAME=Uwe_the_cruel`

**IRC Server:**
`export IRCSERVER=chat.freenode.net` -> `export IRCSERVER=irc.twitch.net`

This script is completely optional. Another solution would be, to export these variables in your shell's config file:
```
~/.bashrc
~/.zshrc
...
```

IRC-servers can be handled very differently as well (multiple ones), but as I personally don't need that, I prefer this approach.

**Note:**
If you *DON'T* use this script, you have to change the `Exec=` line in your .desktop file accordingly.


# .bitchxrc
This file contains all your BitchX settings and will be run, as soon as BitchX connected to a server.
Here, you can set aliases for various commands, load scripts/themes, set common settings and set up your client.

## Aliases:
`alias nw /window new hide`
This would create an alias, so you can quickly add a new tab to your client with a simple:
`/nw`

## Scripts:
`load ~/.BitchX/scripts/ankh/ankh.bx`
This line loads ankh's script/theme. There are more scripts in the `~/.BitchX/scripts/` directory.

## set [OPTION]:
This third block sets various configs, you may want to edit. Most of them are pretty straight forward and/or explained in the manpage.
`man BitchX`

## msg NickServ:
This line is intented for users, that want to identify with the IRC-server. It simply messages the Nick-Server with your password (you have to replace `$PASSWORD` with your actual password).
**Note:**
This can be a security-risk, as your password will be stored as plain text. You can also store your password in an encrpted text-file and forward this to BitchX.
Another solution would be, to simply message the NickServ manually.

## window:
The last two block are for setting up BitchX in a Irssi-like manner.
For each channel, you intend to join, an own window will be created.
After a 10 seconds delay (usually the time until NickServ identifies you), you join the channels.
Usually, there is a lot of garbage output, which will be stored in an extra window named `TEMP`.
The `TEMP` window will be killed off after 11 seconds, right before BitchX returns to the `ROOT` window, indicating, that you can use it now.
You may add more windows and channels to this config, however, make sure to name them correctly (numbers) and put the lines somewhere between the `ROOT` and the `TEMP` windows. The channel-part has to be BEFORE the last window is killed.
```
window name ROOT double off split off
window new hide next name 2 double off split off
window new hide next name 3 double off split off
window new hide next name 4 double off split off     <- THIS IS THE NEW ONE
window new hide next name TEMP double off split off

timer 10 window 2 channel #freenode
timer 10 window 3 channel #bitchx
timer 10 window 4 channel #linux    <- THIS IS THE NEW ONE
timer 11 window kill
timer 12 window next
```

# .BitchX/
This folder contains the away-/quit-messages, your scripts and a save-file, if you type `/save` in your BicthX-client.
There really isn't much to say about this other than, all of these can be edited.
Scripts will be loaded from your `~/.bitchxrc` file.


# Usage
You can add new windows with the `/nw` alias and kill the current window with the `/kw` alias.
Note, that killing a window doesn't mean you left this channel. So you probably want to leave the channel and THEN kill its window/tab.

You can switch between windows/tabs with alt+[number].
The ROOT-window has the number 1 (eventhough it shows [0]).


# Screenshot
![BitchX-IRC](BitchX/screenshot.png)
